﻿using JNPF.Basics.Models.DataInterface.Entities;
using JNPF.Utils;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace JNPF.Basics.Logic.DataInterface
{
    /// <summary>
    /// 数据接口
    /// 版 本：V3.0.0
    /// 版 权：引迈信息技术有限公司（https://www.jnpfsoft.com）
    /// 作 者：JNPF开发平台组
    /// 日 期：2017.11.07
    /// </summary>
    interface DataInterfaceIService
    {
        /// <summary>
        /// 列表(分页)
        /// </summary>
        /// <param name="input">参数</param>
        /// <returns></returns>
        Task<PageResult<DataInterfaceEntity>> GetList(PageInput input);

        /// <summary>
        /// 列表
        /// </summary>
        /// <param name="input">参数</param>
        /// <returns></returns>
        Task<List<DataInterfaceEntity>> GetList();

        /// <summary>
        /// 信息
        /// </summary>
        /// <param name="id">主键id</param>
        /// <returns></returns>
        Task<DataInterfaceEntity> GetInfo(string id);

        /// <summary>
        /// 创建
        /// </summary>
        /// <param name="entity">实体</param>
        /// <returns></returns>
        Task<int> Create(DataInterfaceEntity entity);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="entity">实体</param>
        /// <returns></returns>
        Task<int> Delete(DataInterfaceEntity entity);

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="entity">实体</param>
        /// <returns></returns>
        Task<int> Update(DataInterfaceEntity entity);
    }
}
